<template>
  <div class="synchronouSpread">
    <div class="synchronouSpreadicon">
      <div class="defaultcommodityList1" :style="{ background: datas.bgcolors }">
        <div class="tablist" v-show="datas.isShowTab === 1">
          <span>{{ datas.tabNameLeft || '左侧标题' }}</span>
          <span>{{ datas.tabNameRight || '右侧标题' }}</span>
        </div>
        <!-- 无内容 -->
        <div class="synchcontent"  v-show="!datas.imageList || !datas.imageList[0]">
          <img class="zhanwei" src="../../../assets/img/icon10-1.png" alt="" />
          <img class="fengexian" v-show="datas.appListType === 0" src="../../../assets/images/fengexian.png" alt="">
          <div class="synchcontentTitle">
            <p></p>
            <h3>{{ datas.synTitle || '这是栏目标题' }}<span>{{ datas.synDesc || '这是栏目描述' }}</span></h3>
          </div>
          <div class="optionlist">
            <div class="appListType0" v-show="datas.appListType === 0" v-for="index in 4" :key="index">
              <img src="../../../assets/images/mor.png" alt="">
              <p>标题名称</p>
            </div>
            <div class="appListType1" v-show="datas.appListType === 1" v-for="ind in 4" :key="ind + '00'">
              <img src="../../../assets/images/mor.png" alt="">
              <p>标题名称</p>
            </div>
          </div>
        </div>
        <!-- 有内容 -->
        <div class="synchcontent" v-show="datas.imageList && datas.imageList[0]">
          <img class="zhanwei" src="../../../assets/img/icon10-1.png" alt="" />
          <img class="fengexian" v-show="datas.appListType === 0" src="../../../assets/images/fengexian.png" alt="">
          <div class="synchcontentTitle">
            <p></p>
            <h3>{{ datas.synTitle || '这是栏目标题' }}<span>{{ datas.synDesc || '这是栏目描述' }}</span></h3>
          </div>
          <div class="optionlist">
            <div class="appListType0" v-show="datas.appListType === 0" v-for="(item,index) in datas.imageList" :key="index">
              <img :src="item.src" alt="">
              <p>{{ item.title }}</p>
            </div>
            <div class="appListType1" v-show="datas.appListType === 1" v-for="(ite,ind) in datas.imageList" :key="ind + '00'">
              <img :src="ite.src" alt="">
              <p>{{ ite.title }}</p>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- 删除组件 -->
    <slot name="deles" />
  </div>
</template>
  
<script>
export default {
  name: "SynchronouSpread",
  props: {
    datas: Object,
  },
};
</script>
  
<style scoped lang="scss">
.synchronouSpread {
  position: relative;
  .synchronouSpreadicon {
    .defaultcommodityList1{
      padding: 10px;
      .tablist{
        display: flex;
        align-items: center;
        justify-content: space-between;
        span{
          width: 165px;
          height: 30px;
          line-height: 30px;
          border-radius: 30px;
          // border: 1px solid #ccc;
          background: #fff;
          text-align: center;
          display: block;
          font-size: 14px;
          box-shadow: 0px 3px 12px 0px rgba(0,0,0,0.05);
        }
      }
      .synchcontent{
        width: 350px;
        border-radius: 8px;
        background: #ffffff;
        margin-top: 10px;
        .zhanwei{
          width: 100%;
          height: 180px;
          display: block;
          margin-bottom: 20px;
        }
        .fengexian{
          width: 100%;
          height: 8px;
          display: block;
          margin-bottom: 10px;
        }
        .synchcontentTitle{
          display: flex;
          align-items: center;
          p{
            width: 4px;
            height: 18px;
            background: linear-gradient(180deg, #77F37A 0%, #53C856 100%);
            border-radius: 16px;
            display: block;
            margin-right: 12px;
          }
          h3{
            font-size: 18px;
            font-family: PingFang SC, PingFang SC;
            font-weight: 500;
            color: rgba(0,0,0,0.85);
            span{
              font-size: 12px;
              color: #666666;
              padding-left: 6px;
            }
          }
        }
        .optionlist{
          display: flex;
          align-items: center;
          flex-wrap: wrap;
          .appListType0{
            width: 25%;
            img{
              width: 48px;
              height: 48px;
              border-radius: 50%;
              display: block;
              margin: 10px auto;
            }
            p{
              font-size: 12px;
              font-family: PingFang SC-Regular, PingFang SC;
              font-weight: 400;
              color: rgba(0,0,0,0.65);
              text-align: center;
            }
          }
          .appListType1{
            width: 160px;
            height: 52px;
            background: #fff;
            box-shadow: 0px 3px 12px 0px rgba(0,0,0,0.05);
            border-radius: 10px;
            display: flex;
            align-items: center;
            margin-left: 10px;
            margin-bottom: 10px;
            img{
              width: 36px;
              height: 36px;
              border-radius: 50%;
              display: block;
              margin: 0 15px 0 30px;
            }
            p{
              font-size: 12px;
              font-family: PingFang SC-Regular, PingFang SC;
              font-weight: 400;
              color: rgba(0,0,0,0.65);
            }
          }
        }
      } 
    }
  }
}
</style>
  